<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--#include file="DataLoad.asp"-->
<html>
<head>
<title><%=GuildName%> - DKP系统</title>
<script language="JavaScript" src="inc/jquery.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="Generator" content="EditPlus">
<meta name="Author" content="SULei">
<meta name="Keywords" content="魔兽世界DKP系统 DKP程序 公会DKP">
<meta name="Description" content="">
<link href="<%=StylePath%>/main.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" src="style/styleplus.js"></script>
<script language="JavaScript" src="inc/UBB_UI.js"></script>
<style type="text/css" media="all">

</style>
</head>

<body>
<div class="header">
<!--#include file="menu.asp"-->
</div>
<div class="main">


<%if request("action")="Search" then call Search()%>
<div class="SearchFrame outframe">
	<h3>DKP查询</h3>
<form method=post action="default.asp?action=Search">
	<input type="text" name="keyword"><input type="submit" value="查询">
	<br>输入角色名字
	<%If SearchError<>"" Then Response.write "<br><b>"&SearchError&"</b>"%>
</form>
</div>


<div class="sideframe outframe">
	<div class="raidlist">
	<h3>近期活动</h3>

		<%
		sql="select top 5 * from raid where raid_player<>'' Order by raid_actiontime desc"
			rs.open sql,conn,1,1
				if rs.bof or rs.eof then
					response.write "<dd>没有活动</dd>"
				else	
					for i = 1 to rs.recordcount%>
						<dl>
							<dt><a href="raid_report.asp?id=<%=rs("id")%>"><%=rs("raid_name")%></a></dt>
							<dd class="date"><%=time_type(rs("raid_concentratetime"),"11")%></dd>
							<dd class="raidclass"><%=raidclassText(rs("raid_class"))%></dd>
							<dd class="commander"><%=rs("raid_commander")%></dd>
							<dd class="plan"><%=Left(rs("raid_plan"),80)%></dd>
						</dl>
		<%			rs.movenext
						if rs.eof then exit for
						next
				end if
			rs.close
		%>

	</div>
</div>

<div class="rightframe">
	<table class="outframe interlace">
	<%
			Response.write "<tr><th>DKP分类</th><th>查看</th><th>更新日期</th><th>管理</th></tr>"
			sql="select * from raid_class order by id"
			rs.open sql,conn,1,1
				if not (rs.bof or rs.eof) then
				for iiw = 1 to rs.recordcount
					Response.write "<tr>"
					Response.write "<td><b>"&rs("class_name")&"</b> - "&rs("class_note")&"</td>"
					Response.write "<td><a class='abtn' href='dkplist_"&rs("id")&".html'>详细报表</a> <a class='abtn' href='dkpsimplelist_"&rs("id")&".html'>简单列表</a> <a class='abtn' href='dkpText_"&rs("id")&".html'>文本格式</a></td>"
					Response.write "<td>"&time_type(rs("closing_date"),8)&"</td>"
					if CheckAdmin()=True then
					Response.write "<td><a class='abtn' href='admin_dkplist.asp?class="&rs("id")&"'>现在更新</a></td>"
					Else
					Response.write "<td></td>"
					End If
					Response.write ""
					Response.write "</tr>"
				rs.movenext
				next
				end if
			rs.close		
			'http://tw.wowarmory.com/item-info.xml?i=34853
	%>

	</table>



	<div class="info outframe">
	<h3>公会动态 <%if CheckAdmin() then response.write "<a href='?action=add'>添加</a>"%></h3>
	<%if CheckAdmin() and (request("action")="add" or request("action")="edit") then call NewsAddForm()%>
	<%if CheckAdmin() and request("action")="add2" then call NewsAddSql()%>
	<%if CheckAdmin() and request("action")="del" then call NewsdelSql()%>
	<%

	sql="select * from article where article_class='news' order by id desc"
	rs.open sql,conn,1,1
		if rs.eof or rs.bof then
		's
		else
			for ig = 1 to 8
				response.write "<div class='"&linec(ig)&"'>"
				response.write "<h4>"&rs("article_title")&CAbutton(rs("id"))&"</h4>"
				response.write "<p>"&UbbCode((rs("article_text")))&"</p>"
				response.write "</div>"
			rs.movenext
			if rs.eof then exit for
			next
		end if
	rs.close
	%>
	</div>
</div>
</div>

<div id="footer"><!--#include file="footer.asp"--></div>

</body>
</html>

<%

function WorldEventImg(thisday)
	Const Basedate="2005-1-17"
	Dim today,renew
	today=now()
	if Weekday(thisday)=3 then 
		renew=renew& "<img src='images/raid/mc.gif' /><img src='images/raid/bwl.gif' /><img src='images/raid/aq40.gif' />"
	else
		renew=renew& "<img src='images/raid/none.gif' /><img src='images/raid/none.gif' /><img src='images/raid/none.gif' />"
	end if				
	if datediff("d",Basedate,thisday)/5=Cint(datediff("d",Basedate,thisday)/5) then 
		renew=renew& "<img src='images/raid/onx.gif' />"
	else
		renew=renew& "<img src='images/raid/none.gif' />"
	end if
	if datediff("d",Basedate,thisday)/3=Cint(datediff("d",Basedate,thisday)/3) then 
		renew=renew& "<img src='images/raid/zg.gif' /><img src='images/raid/aq20.gif' />"
	else
		renew=renew& "<img src='images/raid/none.gif' /><img src='images/raid/none.gif' />"
	end if
	WorldEventImg=renew
End Function



Sub Calendar()
	Dim tx
	Dim today,thisday,renew
	Const Basedate="2005-1-17"
	today=now()
	for i = 0 to 6
		thisday=dateadd("d",i,today)
			if Weekday(thisday)=3 then 
				renew=renew& "<img src='images/raid/mc.gif' /><img src='images/raid/bwl.gif' /><img src='images/raid/aq40.gif' />"
			else
				renew=renew& "<img src='images/raid/none.gif' /><img src='images/raid/none.gif' /><img src='images/raid/none.gif' />"
			end if
			if datediff("d",Basedate,thisday)/5=Cint(datediff("d",Basedate,thisday)/5) then 
				renew=renew& "<img src='images/raid/onx.gif' />"
			else
				renew=renew& "<img src='images/raid/none.gif' />"
			end if
			if datediff("d",Basedate,thisday)/3=Cint(datediff("d",Basedate,thisday)/3) then 
				renew=renew& "<img src='images/raid/zg.gif' /><img src='images/raid/aq20.gif' />"
			else
				renew=renew& "<img src='images/raid/none.gif' /><img src='images/raid/none.gif' />"
			end if
	
		tx=tx&"<li>"&day(thisday)&renew&"</li>"
		renew=""
	next
	Response.write "<div class='calendar'><ul><h3>"&time_type(now(),"11")&" <a target='_blank' href='http://www.google.com/calendar/render?cid=o2u1do6qk1r8ke4hp9a8gins30%40group.calendar.google.com'>添加到您的Google日历</a></h3>"&tx&"</ul></div>"
End Sub


sub newsAddForm()
	if request("action")="edit" then
		sql="select top 1 * from article where article_class='news' and id="&request("var")
		rs.open sql,conn,1,1
			response.write "<form name='put_log' method='post' action='?action=add2'><ul><li><input type='text' name='article_title' size='60' value='"&rs("article_title")&"' /> <a href='javascript:hyperlink()'>链接</a> <a href='javascript:image()'>图片</a> <a href='javascript:bold()'>加粗</a></li>"
			response.write "<li><textarea name='article_text' rows='8' cols='80' name='l_content' id='l_content'>"&Server.HtmlEncode(rs("article_text"))&"</textarea></li>"
			response.write "<li><input type='hidden' name='article_date' value='"&rs("article_date")&"' /><input type='hidden' name='article_id' value='"&request("var")&"' /><input type='submit' value='编辑' /></li></ul></form>"
			
		rs.close
	elseif request("action")="add" then
		response.write "<form name='put_log' method='post' action='?action=add2'><ul><li><input type='text' name='article_title' size='60' value='' /> <a href='javascript:hyperlink()'>链接</a> <a href='javascript:image()'>图片</a> <a href='javascript:bold()'>加粗</a></li>"
		response.write "<li><textarea name='article_text' rows='8' cols='80' name='l_content' id='l_content'></textarea></li>"
		response.write "<li><input type='hidden' name='article_id' value='' /><input type='submit' value='添加' /></li></ul></form>"
	end if
End sub

'读取计划
function news(id) 
	if IsNumeric(id) and id<>"" then
	else
	news=""
	exit function
	end if
	rs.open sql,conn,1,1
		if not (rs.eof or rs.bof) then
		news=rs("article_text")
		end if
	rs.close
end function

Sub NewsAddSql()
dim aid
if request("article_id")<>"" and IsNumeric(request("article_id")) then 
aid=request("article_id")
else
aid=0
end if
	sql="select top 1 * from article where article_class='news' and id="&aid
	rs.open sql,conn,1,3
	if rs.eof or rs.bof then
		rs.addnew
		rs("article_class")="news"
		rs("article_title")=request("article_title")
		rs("article_text")=request("article_text")
		rs("article_date")=time_type(now(),3)
		rs("article_editor")=Session("UserCheck")
		rs.update
	else
		rs("article_class")="news"
		rs("article_title")=request("article_title")
		rs("article_text")=request("article_text")
		rs("article_date")=time_type(request("article_date"),3)
		rs("article_editor")=Session("UserCheck")
		rs.update		
	end if
	response.redirect "default.asp"
End Sub

sub NewsdelSql()
	if IsNumeric(request("var")) then
	conn.execute("Delete * from article where id="&request("var"))
	end if
end sub

Function CAbutton(id)
	if CheckAdmin() then
		CAbutton=" [<a href='default.asp?action=edit&amp;var="&id&"'>Edit</a>] [<a href='default.asp?action=del&amp;var="&id&"'>X</a>]"
	end if
end Function

%>